function generateid()
	{
	$nrC = 0;
	$chk_code = "";
	$char = "";
	while($nrC <= 9)
		{ 
		$c = rand(48, 90); //generates a casual number between 48 and 90
		if( ($c >= 48) && ($c <= 57) )
			{
			//rand generated a digit
			$char = chr($c);
			$chk_code .= $char;
			$char = "";
			$nrC = $nrC + 1;
			}
		if( ($c >=65) && ($c <= 90) )
			{
			//rand generated a letter
			$char = chr($c);
			$chk_code .= $char;
			$char = "";
			$nrC = $nrC + 1;
			}
		}
	return $chk_code;
	}